package com.hejx.managecenter.web.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by hejx on 2018/6/5.
 */
@Controller
@Slf4j
public class MainController{

    @Value("${login_page}")
    private String LOGIN_PAGE;

    @Value("${mytest}")
    private String mytest;

    @RequestMapping({"index","/"})
    @ResponseBody
    public String index(){
        return mytest;
    }

    @RequestMapping(value = "default")
    public String defaultPage(){
        return "default";
    }

    @RequestMapping(value = "403")
    public String _403(){
        return "403";
    }

    @RequestMapping(value = "/testRestInterface")
    @ResponseBody
    public Object test(String cname, String mname, HttpServletRequest request) {
        return null;
    }

    @RequestMapping(value = "/logout")
    public String logout(HttpServletRequest request){
        return null;
    }


}
